<template>
  <ul>
    <li
      v-for="(item, inde) in steps"
      :key="inde"
      class="el-step__arrow"
    >
      <div
        v-if="item.img"
        class="ditem"
        :style="{ 'border-color': item.type != 0 ? '' : '#3d9d6d' }"
      >
        <img
          :src="`http://117.160.141.22:8022/images/${item.img}`"
          alt=""
        />
      </div>
      <div
        v-else
        class="ditem"
        :style="{ 'border-color': item.type != 0 ? '' : '#3d9d6d' }"
      >
        {{ item.type }}
      </div>
      <span>{{ item.title }}</span>
    </li>
  </ul>
</template>
<script>
export default {
  // eslint-disable-next-line vue/require-prop-types
  props: ["steps"],
  data() {
    return {};
  },
};
</script>
<style lang="scss" scoped>
.redcolor {
  border-color: red;
}
ul {
  flex: 2;
  box-sizing: border-box;
  width: 100%;
  justify-content: space-between;
}
li {
  width: 16.66%;
  float: left;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 1 auto;
  height: auto;
  .ditem {
    box-sizing: border-box;
    border: 12px double red;
    width: 70px;
    height: 70px;
    text-align: center;
    line-height: 46px;
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 5px;
    img{width: 100%;}
  }
  span {
    font-size: 14px;
  }
}
.el-step__arrow:last-child::after,
.el-step__arrow:last-child::before{
  width: 0;
}
.el-step__arrow::after,
.el-step__arrow::before {
  content: "";
  display: inline-block;
  position: absolute;
  height: 19px;
  width: 2px;
  right: 0;
  top: 30px;
  background: #395ea3;
}
.el-step__arrow::before {
  transform: rotate(-49deg) translateY(-4px);
  transform-origin: 0 0;
}
.el-step__arrow::after {
  transform: rotate(45deg) translateY(4px);
  transform-origin: 100% 100%;
}
</style>
